<?php

namespace common\model\sell66;

use common\db\Sell66;

class ActionLog extends Sell66
{
    protected $table = 'action_log';
	
    public static function addLog($action,$userId,$steamId,$errorMsg,$data=[]){
    	$model = new self();
    	$model->action = $action;
    	$model->user_id = $userId;
    	$model->steam_id = $steamId;
    	$model->error_msg = $errorMsg;
    	$model->note = json_encode($data);
    	$model->updated_time = time();
    	$model->created_time = time();
    	return $model->save();
    }
}